﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="videos.aspx.vb" Inherits="photomania._videos" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">
        .st
        {
            font-size: medium;
        }
        
        
        .note
        {
            font-size: xx-small;
            font-style: italic;
            color: #FF0000;
        }
        .guide
        {
            color: #696969;
        }
        .newVideoObjects
        {
            height: 1304px;
        }
        .listOfNewVideos
        {
            height: 1118px;
        }
    p.MsoNormal
	{margin-top:0in;
	margin-right:0in;
	margin-bottom:10.0pt;
	margin-left:0in;
	line-height:115%;
	font-size:11.0pt;
	font-family:"Calibri","sans-serif";
	}
        .buttons
        {}
        .style7
        {
            text-decoration: none;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div class="intro">
    <h2>
        Fashion video gallery</h2>
    </div>
    <br />
    <div class="newVideoObjects">
        <strong>&nbsp; Video ID:</strong><br />
        &nbsp;
        <asp:TextBox ID="txtvideid" runat="server" Font-Names="Calibri" Width="221px"></asp:TextBox>
        &nbsp; Exa<em>mple&nbsp; </em>
                <a href="http://www.youtube.com/watch?v=lHMHd8Z2TuU" class="style7"><em>
                http://www.youtube.com/watch?v=</em></a><a href="http://www.youtube.com/watch?v=lHMHd8Z2TuU"><span style="color:red"><em>lHMHd8Z2TuU</em></span></a>&nbsp; 
        Enter underline part of the Youtube video Link<br />
        <br />
        <strong>&nbsp; Title:<br />
            &nbsp;
            <asp:TextBox ID="txtvideotitle" runat="server" Font-Names="Calibri" Width="288px"></asp:TextBox>
            <br />
            <br />
            &nbsp; Description:<br />
            &nbsp;
            <asp:TextBox ID="txtvideodescription" runat="server" Font-Names="Calibri" Height="61px"
                TextMode="MultiLine" Width="374px"></asp:TextBox>
            &nbsp;
            <br />
            <asp:Button ID="btnAddVideo" runat="server" Text="Upload Video" 
            Width="98px" CssClass="buttons" Height="25px" />
            <br />
        </strong>
    <h2>
        videos</h2>
        <p>
            &nbsp;</p>
        <div class="listOfNewVideos">
            <asp:ListView ID="ListView1" runat="server" DataSourceID="SqlDataSource1">
                <AlternatingItemTemplate>
                    <strong>Title:</strong> <a href="VideosPlayComments.aspx?id=<%# Eval("VideoID") %>">
                        <%# Eval("VideoTitle") %></a>
                    <br />
                    <strong>Description:</strong>
                    <asp:Label ID="VideoDescriptionLabel" runat="server" Text='<%# Eval("VideoDescription") %>' />
                    <br />
                    <strong>Date Uploaded:</strong>
                    <asp:Label ID="DateUploadedLabel" runat="server" Text='<%# Eval("DateUploaded") %>' />
                    <br />
                    <strong>Time Uploaded:</strong>
                    <asp:Label ID="TimeUploadedLabel" runat="server" Text='<%# Eval("TimeUploaded") %>' />
                    <br />
                    <strong>Video Posted by:</strong> <a href="Profile.aspx?Username=<%# Eval("UserName") %>">
                        <asp:Label ID="UserNameLabel" runat="server" Text='<%# Eval("UserName") %>' /></a>
                    <br />
                    <br />
                    </span>
                </AlternatingItemTemplate>
                <EditItemTemplate>
                    <span style=""><strong>Title:</strong> <a href="VideosPlayComments.aspx?id=<%# Eval("VideoID") %>">
                        <%# Eval("VideoTitle") %></a>
                        <br />
                        <strong>Description:</strong>
                        <asp:TextBox ID="VideoDescriptionTextBox" runat="server" Text='<%# Bind("VideoDescription") %>' />
                        <br />
                        <strong>Date Uploaded:</strong>
                        <asp:TextBox ID="DateUploadedTextBox" runat="server" Text='<%# Bind("DateUploaded") %>' />
                        <br />
                        <strong>Time Uploaded:</strong>
                        <asp:TextBox ID="TimeUploadedTextBox" runat="server" Text='<%# Bind("TimeUploaded") %>' />
                        <br />
                        <strong>Video Posted by:</strong> <a href="Profile.aspx?Username=<%# Eval("UserName") %>">
                            <asp:Label ID="UserNameLabel" runat="server" Text='<%# Eval("UserName") %>' /></a>
                        <br />
                        <asp:Button ID="UpdateButton" runat="server" CommandName="Update" Text="Update" />
                        <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" Text="Cancel" />
                        <br />
                        <br />
                    </span>
                </EditItemTemplate>
                <EmptyDataTemplate>
                    <span>No Videos added.</span>
                </EmptyDataTemplate>
                <InsertItemTemplate>
                    <span style=""><strong>Title:</strong> <a href="VideosPlayComments.aspx?id=<%# Eval("VideoID") %>">
                        <%# Eval("VideoTitle") %></a>
                        <br />
                        <strong>Description:</strong>
                        <asp:TextBox ID="VideoDescriptionTextBox" runat="server" Text='<%# Bind("VideoDescription") %>' />
                        <br />
                        <strong>Date Uploaded:</strong>
                        <asp:TextBox ID="DateUploadedTextBox" runat="server" Text='<%# Bind("DateUploaded") %>' />
                        <br />
                        <strong>Time Uploaded:</strong>
                        <asp:TextBox ID="TimeUploadedTextBox" runat="server" Text='<%# Bind("TimeUploaded") %>' />
                        <br />
                        <strong>Video Posted by:</strong> <a href="Profile.aspx?Username=<%# Eval("UserName") %>">
                            <asp:Label ID="UserNameLabel" runat="server" Text='<%# Eval("UserName") %>' /></a>
                        <br />
                        <asp:Button ID="InsertButton" runat="server" CommandName="Insert" Text="Insert" />
                        <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" Text="Clear" />
                        <br />
                        <br />
                    </span>
                </InsertItemTemplate>
                <ItemTemplate>
                    <strong>Title:</strong> <a href="VideosPlayComments.aspx?id=<%# Eval("VideoID") %>">
                        <%# Eval("VideoTitle") %></a>
                    <br />
                    <strong>Description:</strong>
                    <asp:Label ID="VideoDescriptionLabel" runat="server" Text='<%# Eval("VideoDescription") %>' />
                    <br />
                    <strong>Date Uploaded:</strong>
                    <asp:Label ID="DateUploadedLabel" runat="server" Text='<%# Eval("DateUploaded") %>' />
                    <br />
                    <strong>Time Uploaded:</strong>
                    <asp:Label ID="TimeUploadedLabel" runat="server" Text='<%# Eval("TimeUploaded") %>' />
                    <br />
                    <strong>Video Posted by:</strong> <a href="Profile.aspx?Username=<%# Eval("UserName") %>">
                        <asp:Label ID="UserNameLabel" runat="server" Text='<%# Eval("UserName") %>' /></a>
                    <br />
                    <br />
                    </span>
                </ItemTemplate>
                <LayoutTemplate>
                    <div id="itemPlaceholderContainer" runat="server" style="">
                        <span runat="server" id="itemPlaceholder" />
                    </div>
                    <div style="">
                        <asp:DataPager ID="DataPager1" runat="server" PagedControlID="ListView1" PageSize="10">
                            <Fields>
                                <asp:NextPreviousPagerField ButtonType="Button" ShowFirstPageButton="True" ShowNextPageButton="False"
                                    ShowPreviousPageButton="False" />
                                <asp:NumericPagerField />
                                <asp:NextPreviousPagerField ButtonType="Button" ShowLastPageButton="True" ShowNextPageButton="False"
                                    ShowPreviousPageButton="False" />
                            </Fields>
                        </asp:DataPager>
                    </div>
                </LayoutTemplate>
                <SelectedItemTemplate>
                    <span style=""><strong>Title:</strong> <a href="VideoPlay.aspx?id=<%# Eval("VideoID") %>">
                        <%# Eval("VideoTitle") %></a>
                        <br />
                        <strong>Description:</strong>
                        <asp:Label ID="VideoDescriptionLabel" runat="server" Text='<%# Eval("VideoDescription") %>' />
                        <br />
                        <strong>Date Uploaded:</strong>
                        <asp:Label ID="DateUploadedLabel" runat="server" Text='<%# Eval("DateUploaded") %>' />
                        <br />
                        <strong>Time Uploaded:</strong>
                        <asp:Label ID="TimeUploadedLabel" runat="server" Text='<%# Eval("TimeUploaded") %>' />
                        <br />
                        <strong>Video Posted by:</strong> <a href="Profile.aspx?Username=<%# Eval("UserName") %>">
                            <asp:Label ID="UserNameLabel" runat="server" Text='<%# Eval("UserName") %>' /></a>
                        <br />
                        <br />
                    </span>
                </SelectedItemTemplate>
            </asp:ListView>
            <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:photodb %>"
                ProviderName="<%$ ConnectionStrings:photodb.ProviderName %>" SelectCommand="SELECT Videos.VideoID, Videos.VideoLink, Videos.VideoTitle, Videos.VideoDescription, Videos.DateUploaded, Videos.TimeUploaded, aspnet_Users.UserName FROM (aspnet_Users INNER JOIN Videos ON aspnet_Users.UserName = Videos.UserName) ORDER BY Videos.VideoID DESC
">
            </asp:SqlDataSource>
        </div>
    </div>
    <br />
</asp:Content>
